import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:xmshop/app/modules/cart/views/cart_view.dart';
import 'package:xmshop/app/modules/category/views/category_view.dart';
import 'package:xmshop/app/modules/give/views/give_view.dart';
import 'package:xmshop/app/modules/home/views/home_view.dart';
import 'package:xmshop/app/modules/user/views/user_view.dart';

class TabsController extends GetxController {
  //TODO: Implement TabsController

  final RxInt currIndex = 0.obs;
  PageController pageController = PageController(initialPage: 0);

  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    super.onClose();
  }

  //页面列表
  List<Widget> pageList = [
    const HomeView(),
    const CategoryView(),
    const GiveView(),
    const CartView(),
    const UserView(),
  ];

  //定义底部导航卡列表
  List<BottomNavigationBarItem> bottomNavigationBarItemList = [
    const BottomNavigationBarItem(icon: Icon(Icons.home), label: '首页'),
    const BottomNavigationBarItem(icon: Icon(Icons.category), label: '分类'),
    const BottomNavigationBarItem(icon: Icon(Icons.room_service), label: '服务'),
    const BottomNavigationBarItem(
      icon: Icon(Icons.shopping_cart),
      label: '购物车',
    ),
    const BottomNavigationBarItem(icon: Icon(Icons.people), label: '我的'),
  ];
}
